import request from '@/config/axios'

export interface PartnersVO {
  id: number
  status: byte
  name: string
  logo: string
  sort: number
  slogan: string
}

// 查询品牌企业管理列表
export const getPartnersPage = async (params) => {
  return await request.get({ url: `/cms/partners/page`, params })
}

// 查询品牌企业管理详情
export const getPartners = async (id: number) => {
  return await request.get({ url: `/cms/partners/get?id=` + id })
}

// 新增品牌企业管理
export const createPartners = async (data: PartnersVO) => {
  return await request.post({ url: `/cms/partners/create`, data })
}

// 修改品牌企业管理
export const updatePartners = async (data: PartnersVO) => {
  return await request.put({ url: `/cms/partners/update`, data })
}

// 删除品牌企业管理
export const deletePartners = async (id: number) => {
  return await request.delete({ url: `/cms/partners/delete?id=` + id })
}

// 导出品牌企业管理 Excel
export const exportPartners = async (params) => {
  return await request.download({ url: `/cms/partners/export-excel`, params })
}
